# Copyright 2009 Autodesk, Inc. All rights reserved. # Use of this software is subject to the terms of the Autodesk license agreement # provided at the time of installation or download, or which otherwise accompanies # this software in either electronic or hard copy form. # Script description: # Delete all groups in the scene # # Topic: FBComponent, FBGroup, FBScene # from pyfbsdk import FBSystem, FBComponent # Create the list to store the groups in lList = [] # Accessing the scene components to view all the groups lScene = FBSystem().Scene lGroups = lScene.Groups # Append all the groups in the scene in a list for group in lGroups: lList.append(group) # map the the FBDelete class to each item in the list to delete map( FBComponent.FBDelete, lList ) # Clean-up del (FBSystem, FBComponent, lList, lScene, lGroups)